package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.WechatClient;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 微信-异常回退类
 * @date 2020-12-21 18：04
 */
@Component
public class WechatClientFallback implements WechatClient {

    /**
     * @Description: 用户名，密码登录
     * @author zhuliang
     * @date 2020/12/21 18:16
     */
    @Override
    public Result<String> usernamePasswordLogin(String userName, String passWord) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 发送验证码
     * @author zhuliang
     * @date 2020/12/22 9:41
     */
    @Override
    public Result verificationCode(String phoneNumber, Integer type) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 验证码登录
     * @author zhuliang
     * @date 2020/12/22 13:52
     */
    @Override
    public Result<String> verificationCodeLogin(String phoneNumber, int verificationCode) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 获得openId
     * @author zhuliang
     * @date 2020/12/24 17:15
     */
    @Override
    public Result getOpenId(String code, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 添加用户的openId
     * @author zhuliang
     * @date 2021/2/2 11:05
     */
    @Override
    public Result addOpenId(String openId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

}
